package com.kaibes.platform.file.client.admin;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.kaibes.web.admin.AdminMenu;
import com.kaibes.web.admin.AdminMenuRes;

@Configuration
public class FileClientMenuInit {

    @Bean
    public AdminMenu fileClientMenu() {
        AdminMenu second = new AdminMenu();
        second.setKey("file-client");
        second.setName("文件客户端");
        second.setIcon("fas fa-server");
        second.setHref("");
        second.setSort(1);
        second.setParentKey(AdminMenuRes.MENU_MAIN);
        return second;
    }
    
    @Bean
    public AdminMenu fileMapManage() {
        AdminMenu second = new AdminMenu();
        second.setKey("file-map");
        second.setName("全站文件管理");
        second.setIcon("fas fa-file");
        second.setHref("/admin/file/map");
        second.setSort(1);
        second.setParentKey("file-client");
        return second;
    }
    
    @Bean
    public AdminMenu fileUserManage() {
        AdminMenu second = new AdminMenu();
        second.setKey("file-user");
        second.setName("个人文件管理");
        second.setIcon("fas fa-file");
        second.setHref("/admin/file/map/self");
        second.setSort(2);
        second.setParentKey("file-client");
        return second;
    }
    
    @Bean
    public AdminMenu fileServerSetting() {
        AdminMenu second = new AdminMenu();
        second.setKey("file-server");
        second.setName("服务端设置");
        second.setIcon("fas fa-cog");
        second.setHref("/admin/file/server");
        second.setSort(99);
        second.setParentKey("file-client");
        return second;
    }
    
}
